package com.my.ext.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.my.ext.entity.Admin;
import com.my.ext.mapper.AdminMapper;
import com.my.ext.service.IAdminService;

@Service
public class AdminService implements IAdminService{

	@Autowired
	AdminMapper mapper;
	
	@Override
	public PageInfo<Admin> findAll(int page, int size) {
		PageHelper.startPage(page, size);
		List<Admin> list = mapper.findAll();
		PageInfo<Admin> info = new PageInfo<>(list);
		return info;
	}

	
	
}
